<?php
header("content-type:text/html;charset=utf-8");
include_once "../lib/file.php";
include_once "../lib/function.php";

//接收用户头像
$file = isset($_FILES['avatar']) ? $_FILES['avatar'] : "";
//上传用户头像
$result = $upload->upload($file);
//判断是否上传成功
if($result){
    echo $fun->success("文件上传成功",$result);
}else{
    echo $fun->error("文件上传失败");
}
